<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>QCMS管理后台</title>
	<link rel="stylesheet" type="text/css" href="/libraries/jqui/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="/libraries/jqui/themes/icon.css">
	<script type="text/javascript" src="/libraries/jqui/jquery-1.8.0.min.js"></script>
	<script type="text/javascript" src="/libraries/jqui/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="/libraries/jqui/src/jquery.parser.js"></script>
	<script>
		$(function(){
                    
                
            //实例化树形菜单
	    $("#treemenu").tree({
                url:'/manage/data_json/tree_data.php',
	        lines : true,
	        onClick : function (node) {
                 
	            if (node.attributes) {
                        
	                Open(node.text, node.attributes.url);
	            }
	        }
	    });
	    //在右边center区域打开菜单，新增tab
	    function Open(text, url) {	  
                
             //if ($("#tabs").tabs('exists', text)) {
                //$('#tabs').tabs('select', text);
             //} else {
	            //$('#tabs').tabs('add', {
	                //title : text,
	                //closable : true,
	                //href:url
                        
	           // });
	       // }
	    }
                    
                })
                        </script>
                        
                         <script>
            $(function(){
             //弹出新增窗口
                    addDataWin = $('#addData-window').window({                    
        href:'/manage/systemuserlist.php',
    title:'添加数据',
    closed: true,
    modal: false,
    cache: false,
    minimizable:false,
    maximizable:false,
    collapsible:false,
    shadow: false
    });
//添加数据弹出窗口
    function addData(){
        addDataWin.window('open');                       
    }
    
			$('#tt2').datagrid({
				title:'My Title',
				iconCls:'icon-save',
				width:600,
				height:550,
				nowrap: false,
				striped: true,
				fit: true,
				url:'/manage/data_json/datagrid_data.php',
				sortName: 'code',
				sortOrder: 'desc',
				idField:'code',
				frozenColumns:[[
	                {field:'ck',checkbox:true},
	                {title:'code',field:'code',width:80,sortable:true}
				]],
				columns:[[
			        {title:'Base Information',colspan:3},
					{field:'opt',title:'Operation',width:100,align:'center', rowspan:2,
						formatter:function(value,rec){
							return '<span style="color:red">Edit Delete</span>';
						}
					}
				],[
					{field:'name',title:'Name',width:120},
					{field:'addr',title:'Address',width:120,rowspan:2,sortable:true},
					{field:'col4',title:'Col41',width:150,rowspan:2}
				]],
                                toolbar:[{
					id:'btnadd',
					text:'新增管理员',
					iconCls:'icon-add',
					handler:addData
				},{
					id:'btnedit',
					text:'修改管理员',
					iconCls:'icon-edit',
					handler:function(){
						$('#btnsave').linkbutton('enable');
						alert('cut')
					}
				},'-',{
					id:'btnremove',
					text:'删除',
					
					iconCls:'icon-remove',
					handler:function(){
						$('#btnsave').linkbutton('disable');
						alert('save')
					}
				}],
				pagination:true,
				rownumbers:true
			});
		});
	
        </script>
</head>
<body class="easyui-layout">
	<div data-options="region:'north',split:true" title="North Title" style="height:100px;padding:10px;">
		<p>The north content.</p>
	</div>
	<div data-options="region:'south',split:true" title="South Title" style="height:100px;padding:10px;background:#efefef;">
		<div class="easyui-layout" data-options="fit:true" style="background:#ccc;">
			<div data-options="region:'center'">sub center</div>
			<div data-options="region:'east',split:true" style="width:200px;">sub center</div>
		</div>
	</div>
	
	<div data-options="region:'west',split:true" title="West Menu" style="width:280px;padding1:1px;overflow:hidden;">
		<div class="easyui-accordion" data-options="fit:true,border:false">
			<div title="菜单"  style="padding:10px;overflow:auto;" data-options="selected:true">
                            
                            <ul class="easyui-tree" id="treemenu" ></ul>
			</div>
			<div title="Title2"  style="padding:10px;">
				content2
			</div>
			<div title="Title3" style="padding:10px">
				content3
			</div>
		</div>
	</div>
	<div data-options="region:'center'" title="Main Title" style="overflow:hidden;">
            
            <div class="easyui-tabs" data-options="fit:true,border:false" id="tabs">
			<div title="Tab1" style="padding:5px;overflow:hidden;"> 
				
					<table id="tt2" ></table> 
				
			</div>
			
			<div title="Tab3" data-options="iconCls:'icon-reload',closable:true" style="overflow:hidden;padding:5px;">
				
			</div>
		</div>
            
            
                                <!-- 弹出窗口：添加数据 -->
                                <div id="addData-window" title="添加数据" style="width:510px;height:300px;font-size: 16"></div>
	</div>
</body>
</html>